// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 此处后端没有提供注释 POST /game/cleanup */
export async function cleanupStates(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/game/cleanup', {
    method: 'POST',
    ...(options || {})
  })
}

/** 此处后端没有提供注释 GET /game/config */
export async function getServerConfig(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/game/config', {
    method: 'GET',
    ...(options || {})
  })
}

/** 此处后端没有提供注释 GET /game/health */
export async function healthCheck(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/game/health', {
    method: 'GET',
    ...(options || {})
  })
}

/** 此处后端没有提供注释 GET /game/players */
export async function getAllPlayers(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/game/players', {
    method: 'GET',
    ...(options || {})
  })
}

/** 此处后端没有提供注释 GET /game/players/${param0} */
export async function getPlayer(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getPlayerParams,
  options?: { [key: string]: any }
) {
  const { playerId: param0, ...queryParams } = params
  return request<API.PlayerData>(`/game/players/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {})
  })
}

/** 此处后端没有提供注释 GET /game/stats */
export async function getGameStats(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/game/stats', {
    method: 'GET',
    ...(options || {})
  })
}

/** 此处后端没有提供注释 GET /game/status */
export async function getServerStatus(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/game/status', {
    method: 'GET',
    ...(options || {})
  })
}
